<template>
  <nav class="header">
    <router-link to="/" class="logo">
      <img src="../assets/legend_on.png" alt="TraeAI" class="logo-img">
      TraeAI
    </router-link>

    <div class="nav-links">
      <router-link 
        v-for="link in navLinks" 
        :key="link.path"
        :to="link.path"
        class="nav-link"
      >
        {{ link.name }}
      </router-link>
    </div>

    <div class="actions">
      <button class="btn-login">登录</button>
      <button class="btn-download">下载</button>
    </div>
  </nav>
</template>

<script setup lang="ts">
const navLinks = [
  { name: '定价', path: '/pricing' },
  { name: '功能', path: '/features' },
  { name: '企业', path: '/enterprise' },
  { name: '博客', path: '/blog' },
  { name: '论坛', path: '/forum' },
  { name: '招聘', path: '/jobs' },
]
</script>

<style scoped lang="less">
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-sizing: border-box;
  max-width: 100%;

  .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;

    .logo-img {
      height: 24px;
    }
  }

  .nav-links {
    display: flex;
    gap: 2rem;

    .nav-link {
      color: white;
      text-decoration: none;
      opacity: 0.8;
      transition: opacity 0.2s;

      &:hover {
        opacity: 1;
      }
    }
  }

  .actions {
    display: flex;
    gap: 1rem;

    button {
      padding: 0.5rem 1rem;
      border-radius: 4px;
      cursor: pointer;
      font-size: 0.9rem;
    }

    .btn-login {
      background: transparent;
      border: 1px solid white;
      color: white;
    }

    .btn-download {
      background: white;
      border: none;
      color: #2A0845;
    }
  }
}
</style>